package com.atguigu.single;

import redis.clients.jedis.Jedis;

import java.util.Set;

public class Jedis_Test {
    public static void main(String[] args) {
        //1.创建Jedis
        Jedis jedis = new Jedis("hadoop102", 6379);
        //操作数据
//        System.out.println(jedis.ping());

        //往String类型写数据
//        jedis.set("220718", "good");


        //查询Set类型数
        Set<String> shuihuzhuan = jedis.smembers("shuihuzhuan");
        System.out.println(shuihuzhuan.toString());

        //关闭链接
        jedis.close();
    }
}
